<!-- <div class="row">
  <h1 translate lib="web">entity restrictions</h1>
</div> -->
<div class="col-sm-12 text-right">
  <em class="fas fa-cog fa-spin" ng-show="ctrl.loading==true"></em>
  <a class="btn btn-info" ng-click="ctrl.EnsureCommon()" translate lib="web"
    ng-show="menuctrl.hasrole('admins')">ensurecommon</a>
  <a href="#/EntityRestriction" class="btn btn-info" translate lib="web">addEntityRestriction</a>
</div>
<div ng-show="ctrl.errormessage != ''" class=" alert alert-danger" role="alert">{{ctrl.errormessage}}</div>
<table id="table1" class="table table-striped" when-scrolled="ctrl.more()" style="width: 100%;" aria-label="List of entity restrictions">
  <thead class="thead-dark">
    <tr>
      <th ng-click="ctrl.ToggleOrder('name')" scope="col"><strong translate lib="web">name</strong></th>
      <th ng-click="ctrl.ToggleOrder('collection')" scope="col"><strong translate lib="web">collection</strong></th>
      <th ng-click="ctrl.ToggleOrder('paths')" scope="col"><strong translate lib="web">paths</strong></th>
      <th class="w-150" ng-click="ctrl.ToggleOrder('_created')" scope="col"><strong translate lib="web">created</strong>
      </th>
      <th ng-click="ctrl.ToggleOrder('_modified')" scope="col"><strong translate lib="web">updated</strong>
      </th>
      <th class="w-150" scope="col"></th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="model in ctrl.models">
      <td><a style="color: inherit; text-decoration: inherit;" ng-href="#/EntityRestriction/{{model._id}}">{{model.name}}</a></td>
      <td>{{model.collection}}</td>
      <td>{{model.paths}}</td>
      <td>
        <timesince ng-model="model._created" />
      </td>
      <td>
        <timesince ng-model="model._modified" />
      </td>
      <td>
        <a class="btn" ng-href="#/EntityRestriction/{{model._id}}"><em class="fas fa-edit"></em></a>
        <a class="btn" href ng-click="ctrl.DeleteOne(model)" ng-disabled="ctrl.loading==true"><em
            class="fas fa-trash"></em></a>
      </td>
    </tr>
  </tbody>
</table>